package com.grm.strategy.handler.impl;


import com.grm.strategy.factory.Factory;
import com.grm.strategy.handler.Handler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class Handler2 extends Handler {
    @Override
    public Integer queryAge(Integer age) {
        // 业务逻辑2
        log.info("Handler2 queryAge----------------------------{}", age);
        return age + 5;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        Factory.register("bbb", this);
    }
}
